﻿#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using DotNetEngine.Core;

#endregion

namespace DotNetEngine.Graphics
{
    public class DrawableText : DrawableElement
    {
        #region Properties
        public SpriteFont font;
        public string text;
        float scale;
        public float Scale
        {
            get { return scale; }
            set { scale = value; }
        }

        #endregion

        #region Initialize Methods
        public DrawableText(string text, Vector2 position, Color color, int layer)
            : this(BaseGame.DefaultFont, text, position, color, layer) { }

        public DrawableText(SpriteFont font, string text, Vector2 position, Color color, int layer)
        {
            this.scale = 1;
            this.font = font;
            this.text = text;
            this.Position = position;
            this.Color = color;
            this.Layer = layer;
        }
        #endregion

        #region Public Methods
        public override void Draw()
        {
            BaseGame.RenderTarget.DrawString(font, text, Position, Color, 0, Vector2.Zero, scale, SpriteEffects.None, 0);
        } 

        #endregion

        #region Private Methods
        #endregion
    }
}
